﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using System.Threading.Tasks;
using Zocono.Infrastructure.Common;
using Zocono.WCS.Application.AppHynnStateUp;
using Zocono.WCS.Application.AppLogManage;
using Zocono.WCS.Application.AppTraces;
using Zocono.WCS.WMSApiDomain.WebApi;

namespace Zocono.WCS.Admin.Controllers.MonitorManageMoudle
{
    public class EquipmentStateController : BaseController
    {

        private readonly HynnStateUpApp _HynnStateUpApp;
        private readonly ILogUtil _LogUtil;
        private readonly LogApp _LogApp;

        public EquipmentStateController(HynnStateUpApp hynnStateUpApp, ILogUtil logUtil, LogApp logApp, IMemoryCache memoryCache, TracesApp tracesApp, IHttpContextAccessor httpContextAccessor) : base(memoryCache, tracesApp, httpContextAccessor)
        {
            _HynnStateUpApp = hynnStateUpApp;
            _LogUtil = logUtil;
            _LogApp = logApp;
        }

        public IActionResult Index()
        {
            return View();
        }


        public JsonResult HynnEqupmentStateAsync()
        {
            var hynnStateList = _HynnStateUpApp.GetAllHynnStateInfoAsync();
            //var hynnStateList = WCSMessageWithWMSApi.GetHynnStateAsync();
            return Json(hynnStateList);
        }


    }
}
